package lab02.test24;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Scanner;

public class Data {
    public static void main(String[] args) {
        String data;

        Scanner scanner=new Scanner(System.in);

        System.out.println("Please input data: ");
        data=scanner.nextLine();

        System.out.println(data);
        try {
            String d1="2017-11-02";
            String d2="2016-09-25";

            SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");

            System.out.println((sdf.parse(d1).getTime()-sdf.parse(d2).getTime())/1000/3600/24);
        } catch (ParseException e) {
            e.printStackTrace();
        }
    }
}
